<?php
namespace app\supplier\validate;


class SupplierStoreGoodsAmountValidate extends BaseValidate
{
    public function __construct()
    {
        $rule = [
            'store_id'=>'require|integer',
            'goods_id'=>'require|integer',
            'goods_rule_id'=>'require|integer',
            'money'=>'require|float',
        ];

        $message = [
            'store_id.require'=>'门店id必须',
            'store_id.integer'=>'门店id必须为整数',
            'goods_id.require'=>'商品id必须',
            'goods_id.integer'=>'商品id必须为整数',
            'goods_rule_id.require'=>'规格id必须',
            'goods_rule_id.integer'=>'规格id必须为整数',
            'money.require'=>'金额必须',
            'money.float'=>'金额必须为数字',
        ];

        $scene = [
            'add'  => ['store_id','goods_id','goods_rule_id','money'],//添加
        ];
        parent::__construct($rule, $message, $scene);
    }
}